package com.zhang.springcloud.service.impl;

import com.zhang.springcloud.AccountServiceMain2003;
import com.zhang.springcloud.dao.AccountDao;
import com.zhang.springcloud.service.AccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

@Service
public class AccountServiceImpl implements AccountService {
    @Resource
    AccountDao ad;

    @Override
    public void update(Long pro, BigDecimal coun) {
        try {
            TimeUnit.SECONDS.sleep(20);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        ad.update(pro,coun);
    }
}
